using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace EFDemo
{
    public partial class EFDemoContext : DbContext
    {
        public EFDemoContext() : base("name=EFDemoContext")
        {
        }

        public virtual DbSet<Dept> Dept { get; set; }
        public virtual DbSet<Emp> Emp { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Dept>()
                .Property(e => e.DeptCode)
                .IsUnicode(false);

            modelBuilder.Entity<Emp>()
                .Property(e => e.EmpCode)
                .IsUnicode(false);
        }
    }
}
